﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAWSharp.FileFormats.WavFile.Entities
{
    public class DataHeader
    {
        public char[] dataChunkID { get; set; }
        public int dataChunkSize { get; set; }

        public override string ToString()
        {
            return (string.Format(@"ChunkId: {0}
                                   Chunk Size: {1}"
                                , new string(dataChunkID)
                                , dataChunkSize.ToString()));
        }

        public bool IsValid()
        {
            if (!(new string(dataChunkID) == "data"))
                return false;

            return true;
        }
    }
}
